<!DOCTYPE html>
<html>
<head>
<style>
body {
    height: 1000px;
}

.fixed {
    position: fixed;
    left: 20px;
    top: 20px;
}

p {
    margin-top: 200px;
}

embed {
    margin: 20px;
}
</style>
<script src="../resources/plugin.js"></script>
<script>
startAfterLoadAndFinish(function () {
    window.scrollBy(50, 50);

    if (!window.testRunner) {
        document.body.appendChild(document.createTextNode("This test does not work in manual mode."));
        return;
    }

    testRunner.dumpAsText();

    eventSender.mouseMoveTo(70,70);
    eventSender.mouseMoveTo(90,90);
    eventSender.mouseDown();
    eventSender.mouseUp();
    eventSender.mouseMoveTo(100,100);
    eventSender.mouseDown();
    eventSender.mouseMoveTo(110,100);
    eventSender.mouseUp();
    eventSender.mouseMoveTo(20,20);
});
</script>
</head>
<body>
<div class="fixed">
  <embed type="application/x-blink-test-plugin" width=100 height=100></embed>
</div>
<p>Tests for widget positions being correctly updated after scrolling. <a href="rdar://problem/7559069">rdar://problem/7559069</a></p>
</body>
</html>
